﻿using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;
using LFSRecord2.Model;

namespace LFSRecord2.View.Converters
{
    public class LayerTypeColorConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            CompLayerTypes lt = (CompLayerTypes)value;
            switch (lt)
            {
                case CompLayerTypes.Null:
                    return new SolidColorBrush(Color.FromRgb(242, 125, 125));
                case CompLayerTypes.ReplayControl:
                    return new SolidColorBrush(Color.FromRgb(178, 238, 144));
                case CompLayerTypes.ReplayData:
                    return new SolidColorBrush(Color.FromRgb(176, 168, 243));
            }
            return new SolidColorBrush(Color.FromRgb(184, 184, 184));
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return null;
        }
    }
}
